package buffer

import chisel3.stage.ChiselStage

import java.io.{File, PrintWriter}
import java.nio.file.Paths
import scala.collection.mutable.ArrayBuffer

object Main {
  def main(args: Array[String]): Unit = {
//    val name = "Top"
//    val targetDirSufix = "_build"
//    val targetDir = name + targetDirSufix
//    val arg = new ArrayBuffer[String]
//    arg ++= Array("--target-dir", targetDir)
//    val state = new ChiselStage()
//    val rtl = state.emitSystemVerilog(new Top(), arg.toArray)
//
//    val suffix = "sv"
//    val currentPath = Paths.get(System.getProperty("user.dir"))
//    val out = name + "." + suffix
//    val filePath = Paths.get(currentPath.toString, targetDir, out)
//    new PrintWriter(filePath.toString) {
//      print(rtl);
//      close()
//    }
    chiselFv.Check.bmc(() => new Top(512,2,0));
  }
}